package junit;

import static org.junit.Assert.*;

import org.junit.Test;

import enums.RationLevel;
import enums.TravelPace;

import main.Fort;
import main.Landmark;
import main.Profession;
import main.Store;
import main.Trail;
import main.TravelGroup;
import main.WorldState;

/**
 * This tests the updateWorldState method.
 * @author Ramya
 */

public class WorldStateTest {
	private WorldState state=new WorldState(2, 1, new TravelGroup());
	
	@Test
	public void testCurrentLoc() {
		Landmark dalles = new Landmark("Dalles", new Trail(0, new Landmark("End", null)));
    	Trail trail15 = new Trail(120, dalles);
    	Landmark blueMountains = new Landmark("Blue Mountains", trail15);
    	Trail trail13 = new Trail(162, blueMountains);
    	state.setCurrentLocation(dalles);
    	System.out.println(((Landmark) (state.getCurrentLocation())).getName());
		state.updateWorldState();
		System.out.println(((Landmark) (state.getCurrentLocation())).getName());
		assertEquals(((Landmark) (state.getCurrentLocation())).getName(), "End");
	}
	@Test
	public void testDayOfMonth(){
		state.setDayOfMonth(1);
		state.setMonth(2);
		state.updateWorldState();
		assertSame(state.getDayOfMonth(), 2);
		assertSame(state.getMonth(), 2);
	}
	
}
